Go to the source code of this file.
|
| int | QmuxTransport_Initialize (QmuxTransport *pThis, char *devicePath, bool useMbim, void *pInterfaceSpecific) |
| |
| void | QmuxTransport_ShutDown (QmuxTransport *pThis) |
| |
| void | QmuxTransport_AttachQmiService (QmuxTransport *pThis, struct QmiService *pQmiService) |
| |
| void | QmuxTransport_DetachQmiService (QmuxTransport *pThis, struct QmiService *pQmiService) |
| |
| int | QmuxTransport_SendQmiPacket (QmuxTransport *pThis, uint8_t qmiServiceType, uint8_t qmiClientId, uint16_t qmiTransactionId, uint8_t *qmiPacket, uint16_t qmiPacketSize) |
| |
| #define INVALID_CLIENT_ID 255 |
| #define INVALID_TRANSACTION_ID 0 |
| #define MAX_QMI_CLIENT 255 |
| #define MAX_QMI_CLIENT_ID 255 |
| #define QCQMI_NODE_NAME_PREFIX "qcqmi" |
This structure abstracts a QMUX transport layer. It is responsible for applying QMUX headers to QMI packets from QMI services and forwarding them to the device. It is responsible for receiving QMUX packets from the device. On the basis of QMUX headers, it distributes the SDUs (QMI packets) to the appropriate QMI service. It maintains a list of connected QMI service objects.
- Parameters
-
| useMbim |
- Using MBIM interface as opposed to direct QMUX interface for data layer.
|
| pDataLayer |
- Pointer to instantiated data layer.
|
| deviceFd |
- File descriptor of device.
|
| shutdownFd |
- Event descriptor. Used to signal read thread to terminate.
|
| qmiServiceList |
- List of connected QMI service objects.
|
| writeLock |
- Provides mutual exclusion for write operations.
|
| qmiServiceListLock |
- Provides thread safety for the service list.
|
| readThread |
- Thread responsible for reading from device.
|
| qcqmi |
|
Attaches a QMI service to the transport layer.
- Parameters
-
| [in] | pThis | The primary object of this call. |
| [in] | pQmiService | The QMI service to be attached. |
Detaches a QMI service from the transport layer.
- Parameters
-
| [in] | pThis | The primary object of this call. |
| [in] | pQmiService | The QMI service to be detached. |
| int QmuxTransport_Initialize |
( |
QmuxTransport * |
pThis, |
|
|
char * |
devicePath, |
|
|
bool |
useMbim, |
|
|
void * |
pInterfaceSpecific |
|
) |
| |
Initialize the transport layer.
- Parameters
-
| [in] | pThis | The primary object of this call. |
| [in] | devicePath | Absolute path to device. |
| [in] | useMbim | Use MBIM interface as opposed to direct interface for data layer. |
| [in] | pInterfaceSpecific | A pointer to an object (may be NULL) related to the specific interface used. Currently ignored for useMbim = false. If useMbim = true, it may point to an already initialized MbimTransport object, in which case, this object will use that object rather than try to create its own MbimTransport object. |
- Returns
- 0 on success, < 0 on failure.
| int QmuxTransport_SendQmiPacket |
( |
QmuxTransport * |
pThis, |
|
|
uint8_t |
qmiServiceType, |
|
|
uint8_t |
qmiClientId, |
|
|
uint16_t |
qmiTransactionId, |
|
|
uint8_t * |
qmiPacket, |
|
|
uint16_t |
qmiPacketSize |
|
) |
| |
Send a QMI request to the device and return immediately.
- Parameters
-
| [in] | pThis | The primary object of this call. |
| [in] | qmiServiceType | QMI service type. |
| [in] | qmiClientId | QMI client ID. |
| [in] | qmiTransactionId | QMI transaction ID. Can be used for tracking purposes. |
| [in] | qmiPacket | Pointer to QMI request. |
| [in] | qmiPacketSize | Size in bytes of QMI packet. |
- Returns
- 0 on success, < 0 on failure.
Shut down the transport layer.
- Parameters
-
| [in] | pThis | The primary object of this call. |